<?php

namespace tool;
use mysqli;

class conn{
    private $conn;
    private $data = [];
    public function __construct()
    {
        $this->conn = new Mysqli("127.0.0.1","root","root","bank");
    }

    public function select($sql){
        $result =  $this->conn->query($sql);
        while(true) {
            $row = $result->fetch_assoc();
            if (empty($row)) {
                break;
            }
            $this->data[] = $row;
        }
        return $this->data;
    }

    public function delete(){

    }


}